import {Authority} from './request'

const {get, post} = Authority

// 获取巡查记录表
export const getPatorlList = params => get('/form/road-patrol/v1/queryList', {params})
// 获取巡查时间线
export const queryTimeline = params => get('/form/road-patrol/v1/queryTimeline', {params})
// 新增巡查记录
export const addPatrol = params => post('/form/road-patrol/v1/startPatrol', params)
// 结束巡查
export const endPatrol = params => post('/form/road-patrol/v1/endPatrol', params)
// 删除
export const deletePatrol = params => post('/form/road-patrol/v1/delete', params)
// 新增病害
export const addDamagePatrol = params => post('/form/damage-patrol/v1/add', params)
// 编辑病害
export const updateDamagePatrol = params => post('/form/damage-patrol/v1/update', params)

export const deleteDamagePatrol = params => post('/form/damage-patrol/v1/delete', params)
// 获取病害列表表
export const getDamagePatrolList = params => get('/form/damage-patrol/v1/queryList', {params})
// 新增病害
export const repairDamage = params => post('/form/damage-patrol/v1/handle', params)
// 获取处置时间线
export const handleDamageTimeline = params => get('/form/damage-patrol/v1/handleTimeline', {params})

// 病害设施类型分布
export const installationType = params => get('/statistics/patrol/v1/v1/installationType', {params})

// 子组织下病害情况
export const deptDamagePatrol = params => get('/statistics/patrol/v1/v1/deptDamagePatrol', {params})

// 隧道病害类型分布及占比
export const statistics_damageType3 = params => get('/statistics/patrol/v1/v1/damageType3', {params})

// 涵洞病害类型分布及占比
export const statistics_damageType27 = params => get('/statistics/patrol/v1/v1/damageType27', {params})

// 桥梁病害类型分布及占比
export const statistics_damageType2 = params => get('/statistics/patrol/v1/v1/damageType2', {params})

// 边坡病害类型分布及占比
export const statistics_damageType1 = params => get('/statistics/patrol/v1/v1/damageType1', {params})

// 巡查记录下的病害列表
export const queryByRoadPatrol = params => get('/form/damage-patrol/v1/queryByRoadPatrol', {params})

// 查询大统计
export const statisticsAll = params => get('/statistics/patrol/v1/v1/all', {params})
// 更新大统计
export const statisticsAllAdd = params => post('/statistics/patrol/v1/v1/addAll', params)

